home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 13 / AMIGAplus Sonderheft 13 (1998)(ICP)(DE)[!].iso / rexx / commentblk.bed < prev    next >
Text File  |  1997-12-03  |  1KB  |  65 lines

  1. /*
  2. ** $VER: CommentBlk.bed 1.01 (01.04.96)
  3. **
  4. ** Comment out the selected block using ARexx comments
  5. ** (easily changed to C, Modula-2, Ada, or ASM comments)
  6. **
  7. ** Written by Chris Bailey
  8. ** Modified by Martin Taillefer
  9. ** Modified by Marco Negri
  10. ** Modified by Brian Jones
  11. */
  12.  
  13. OPTIONS RESULTS
  14.  
  15. /* For ARexx commenting */
  16. CommentStart = "/** "
  17. CommentMid     = "**** "
  18. CommentEnd     = "**/ "
  19.  
  20. /*
  21. /* For C commenting */
  22. CommentStart = "// "
  23. CommentMid     = "// "
  24. CommentEnd     = "// "
  25.  
  26. /* For Modula-2 or Pascal commenting */
  27. CommentStart = "(**** "
  28. CommentMid     = " **** "
  29. CommentEnd     = " ****)"
  30.  
  31. /* For Ada commenting */
  32. CommentStart = "-- "
  33. CommentMid     = "-- "
  34. CommentEnd     = "-- "
  35.  
  36. /* For ASM commenting */
  37. CommentStart = "** "
  38. CommentMid     = "** "
  39. CommentEnd     = "** "
  40. */
  41.  
  42. GetBlkDims
  43. PARSE VAR RESULT mode . start . end
  44.  
  45. IF mode = OFF THEN DO
  46.     SetStatusBar "Error: No block marked!"
  47. END; ELSE DO
  48.     MarkBlk
  49.  
  50.     Move start 1
  51.     Text '"' || CommentStart || '\n"'
  52.  
  53.     RecordMacro QUIET
  54.     MoveSOL
  55.     Text '"' || CommentMid || '"'
  56.     MoveDown
  57.     EndMacro
  58.  
  59.     IF end-start > 0 THEN
  60.         PlayMacro end - start
  61.  
  62.     MoveSOL
  63.     Text '"' || CommentEnd || '\n"'
  64. END
  65.